#pragma once
#include"TcpServer.h"
#include"InetAddress.h"
namespace wjc {
	class ChatServer {
	private:
		TcpServer server;

		void onMessage(TcpServer& server, const ConnectionPtr& conn, BufferPtr& buff, Timestamp tm);
		void onConnection(TcpServer& server, const ConnectionPtr& conn);
	public:
		ChatServer(const net::InetAddress& serverAddr, const std::string& name);

		void start();
	};
}
